#if (FEATURE_MODE == 0)
/**
 @file ctc_tmx_pon.h

 @author  Copyright (C) 2011 Centec Networks Inc.  All rights reserved.

 @date 2020-10-28

 @version v1.0

\p
Passive optical networking (PON), like active optical networking, 
uses fiber optic cabling to provide Ethernet connectivity from a
main data source to endpoints.While there are many subtle differences,
a clear distinction between active optical networking and PON topology
is PON's use of a techniquethat distributes a single signal to multiple
branches through unpowered devices called optical beam splitters.PON 
consists of optical line terminal OLT, optical network unit ONU,and 
passive lighting POS.

\p
\b
UNI Port:
\pp
  Used to connect to the user's side port, enter and exit the port packet
  with Tunnel VLAN.
\pp
  Use API ctcs_pon_set_port_propery() to enable UNI Port.
\p
\b
NNI Port:
\pp
  Used to connect to the network side port.
\pp
  Use API ctcs_pon_set_port_propery() to enable UNI Port.
\p
\b
Tunnel Vlan:
\pp
  For VLAN used to mark the ONU device, the uplink business direction,
  the original packet will add a Tunnel VLAN unconditionally after ONU,
  which is completed by the ONU chip.In the direction of downward 
  business, the original message will be unconditionally stripped away
  from a Tunnel Vlan after ONU, which is also completed by the ONU chip.
\p
\b
Gem Port:
\pp
  Port and Tunnel VLAN are mapped, it can be used to identify different
  ONU devices under different PON ports.
\pp
  Use API ctcs_pon_create_gem_port() to create Gem Port.
\p
\b
Vlan Port
\pp
  VLAN PORT has Port and Tunnel Vlan and the VLAN TAG (SVLAN, CVLAN) 
  carried by the message itself. It can be used to identify different
  services transmitted by different ONU devices under different PONs.
\pp
  Use API ctcs_pon_create_vlan_port() to create Vlan Port.

\S ctc_pon.h:ctc_pon_gem_port_t
\S ctc_pon.h:ctc_pon_vlan_port_t
\S ctc_pon.h:ctc_pon_port_cfg_t

*/


#ifndef _CTC_USW_PON_H
#define _CTC_USW_PON_H

#ifdef __cplusplus
extern "C" {
#endif

#include "sal.h"
#include "ctc_pon.h"

/**********************************************************************************
                      Define API function interfaces
***********************************************************************************/


/**
 @brief Create gem port

 @param[in] lchip    local chip id

 @param[in] p_gem_port  refer to ctc_pon_gem_port_t

 @remark[TM.TMM]
        Create gem port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_create_gem_port(uint8 lchip, ctc_pon_gem_port_t* p_gem_port);

/**
 @brief Destroy gem port

 @param[in] lchip    local chip id

 @param[in] p_gem_port  refer to ctc_pon_gem_port_t

 @remark[TM.TMM]
        Create gem port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_destroy_gem_port(uint8 lchip, ctc_pon_gem_port_t* p_gem_port);

/**
 @brief Update gem port

 @param[in] lchip    local chip id

 @param[in] p_gem_port  refer to ctc_pon_gem_port_t

 @remark[TM.TMM]
        Destroy gem port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_update_gem_port(uint8 lchip, ctc_pon_gem_port_t* p_gem_port);

/**
 @brief Get gem port property

 @param[in] lchip    local chip id

 @param[in/out] p_gem_port  refer to ctc_pon_gem_port_t

 @remark[TM.TMM]
        Get gem port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_get_gem_port(uint8 lchip, ctc_pon_gem_port_t* p_gem_port);


/**
 @brief Create vlan port

 @param[in] lchip    local chip id

 @param[in] p_vlan_port  refer to ctc_pon_vlan_port_t

 @remark[TM.TMM]
        Create vlan port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_create_vlan_port(uint8 lchip, ctc_pon_vlan_port_t* p_vlan_port);

/**
 @brief Destroy vlan port

 @param[in] lchip    local chip id

 @param[in] p_vlan_port  refer to ctc_pon_vlan_port_t

 @remark[TM.TMM]
        Destroy vlan port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_destroy_vlan_port(uint8 lchip, ctc_pon_vlan_port_t* p_vlan_port);

/**
 @brief Update vlan port

 @param[in] lchip    local chip id

 @param[in] p_vlan_port  refer to ctc_pon_vlan_port_t

 @remark[TM.TMM]
        Create vlan port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_update_vlan_port(uint8 lchip, ctc_pon_vlan_port_t* p_vlan_port);

/**
 @brief Get vlan port

 @param[in] lchip    local chip id

 @param[in/out] p_vlan_port  refer to ctc_pon_vlan_port_t

 @remark[TM.TMM]
        Get vlan port.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_get_vlan_port(uint8 lchip, ctc_pon_vlan_port_t* p_vlan_port);


/**
 @brief Set network port(uni/nni) port property

 @param[in] lchip    local chip id

 @param[in] cfg  refer to ctc_pon_port_cfg_t

 @param[in] value  point to set value

 @remark[TM.TMM]
        Set network port(uni/nni) port property.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_set_port_propery(uint8 lchip, uint32 gport, ctc_pon_port_cfg_t* cfg);

/**
 @brief Get network port(uni/nni) port property

 @param[in] lchip    local chip id

 @param[in] gport    global port

 @param[in] cfg  refer to ctc_pon_port_cfg_t

 @param[in] value  point to get value

 @remark[TM.TMM]
        Get network port(uni/nni) port property.

 @return CTC_E_XXX
*/
extern int32
ctc_tmx_pon_get_port_propery(uint8 lchip, uint32 gport, ctc_pon_port_cfg_t* cfg);


/**
 @brief Init pon module

 @param[in] lchip    local chip id

 @param[in] gport    global port

 @param[in]  ctc_pon_global_cfg_t pon global config information

 @remark[TM.TMM] Initialize the The Module pon subsystem.

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_pon_init(uint8 lchip, void* p_init_cfg);

/**
 @brief Deinit pon module

 @param[in] lchip    local chip id

 @param[in]  ctc_pon_global_cfg_t pon global config information

 @remark[TM.TMM] Deinitialize the The Module pon subsystem.

 @return CTC_E_XXX

*/
extern int32
ctc_tmx_pon_deinit(uint8 lchip, void* p_init_cfg);



#ifdef __cplusplus
}
#endif

#endif
#endif

